feat: support flavors for JSBundle#163
Merged
Merged
Conversation
artus9033
requested changes
Dec 5, 2025
hurali97
reviewed
Dec 8, 2025
artus9033
approved these changes
Dec 8, 2025
artus9033
left a comment
Collaborator
There was a problem hiding this comment.
Great job! What remains is just the uppercase var name we need to sort out, otherwise LGTM!
hurali97
approved these changes
Dec 8, 2025
hurali97
left a comment
Member
There was a problem hiding this comment.
Looks good, thanks for the PR 🚀
Collaborator
Author
|
Based on our private conversation with @hurali97, a decision was made to generate and include the JS bundle for both Debug and Release variants. Hence, I have reverted my commits |
60a2b89 to
c7d05c5
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Currently,
brownfield-gradle-plugindoesn't support flavors. Only the default variants:DebugandReleaseare supported.If a different flavor is added, like:
FlavorOne, thecreateBundleReleaseJsAndAssetstask won't be executed due to it having a different name now:createBundleFlavorOneReleaseJsAndAssetsthus not generating theindex.android.bundle.Moreover, the assets source location for
index.android.bundleis also not correctly specified. It should reflect the new flavor:app/build/generated/assets/createBundleFlavorOneReleaseJsAndAssets/instead of the default variant:app/build/generated/assets/createBundleReleaseJsAndAssets/.Summary
This PR makes the
createBundle...JsAndAssetstask and assets source location dynamic, reflecting the actual flavor + build type.Test plan
These changes has been tested locally using maven local in a React Native brownfield project.